package com.lxk.client.biz;

import com.lxk.spi.inface.Person;
import com.lxk.spi.inface.PersonService;
import com.lxk.spi.inface.sex;
import org.apache.thrift.TException;

public class PersonBiz {

    public void doBiz(String personName, Integer age, sex personSex,
                      PersonServiceClient personServiceClient) throws TException {
        Person person = new Person();
        person.setPersonName(personName);
        person.setAge(age);
        person.setPersonSex(personSex);
        personServiceClient.getClient().savePerson(person);
        Person getPerson = personServiceClient.getClient().getPerson("personId");
        System.out.println("personName: " + getPerson.getPersonName());
        System.out.println("Age: " + getPerson.getAge());
        System.out.println("personSex: " + getPerson.getPersonSex());
    }

}
